package com.example.demo.common;

public class ResponseMessage<T> {
    private int status;
    private String msg;
    private T data;

    public ResponseMessage(int status, String msg, T data) {
        this.status = status;
        this.msg = msg;
        this.data = data;
    }
    public ResponseMessage(int status, T data) {
        this.status = status;
        this.data = data;
    }

    public ResponseMessage(T data) {
        this.data = data;
    }
    public static<T> ResponseMessage createSuccessMessage(T data){

        return new ResponseMessage(0,data);
    }
    public ResponseMessage(int status, String msg) {
            this.status = status;
            this.msg = msg;
        }
    public int getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }

    public T getData() {
        return data;
    }
}
